﻿using System.Collections.Generic;

namespace Colorful.Furniture.MpManagement
{
    /// <summary>
    ///  发送微信公众号模版消息
    /// </summary>
    public class SendMpTemplateInputDto
    {
        public SendMpTemplateInputDto()
        {
            TemplateItemData = new List<TemplateItemDataInputDto>();
        }

        /// <summary>
        ///  用户openId
        /// </summary>
        public string OpenId { get; set; }

        /// <summary>
        ///  模版id
        /// </summary>
        public string TemplateId { get; set; }

        /// <summary>
        ///  跳转的URL地址
        /// </summary>
        public string Url { get; set; } = string.Empty;

        /// <summary>
        ///  模版项
        /// </summary>
        public List<TemplateItemDataInputDto> TemplateItemData { get; set; }
    }

    /// <summary>
    ///  模版
    /// </summary>
    public class TemplateItemDataInputDto
    {
        public TemplateItemDataInputDto() { }

        public TemplateItemDataInputDto(string name, string value)
        {
            Name = name;
            Value = value;
        }

        public TemplateItemDataInputDto(string name, string value, string color)
        {
            Name = name;
            Value = value;
            Color = color;
        }

        /// <summary>
        ///  模版项名字
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        ///  模版项值
        /// </summary>
        public string Value { get; set; }

        /// <summary>
        ///  模版项字体颜色
        /// </summary>
        public string Color { get; set; } = "#173177";
    }
}